import { Routes, Route, BrowserRouter } from 'react-router-dom'
import routerConfig from './router'

const App = () => {
  return (
    <BrowserRouter>
      <Routes>
          {routerConfig.map((route) => {
            const ComposedComponent = route.component
            return <Route key={route.path} path={route.path} element={<ComposedComponent />}></Route>
          })}
        </Routes>
    </BrowserRouter>
  )
}

export default App
